<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:req="http://jakarta.apache.org/taglibs/request-1.0"
    xmlns:c="http://java.sun.com/jstl/core" version="1.2">
    <jsp:directive.page contentType="application/x-java-jnlp-file"/>
    <jsp:scriptlet>
    String requestPath = request.getRequestURL().toString();
    requestPath = (requestPath == null)  ? ""  : requestPath.substring(0, requestPath.lastIndexOf('/'));
    response.setHeader("Cache-Control", "public");
    String documentURL = request.getParameter("document");
    String signatureDocumentPostURL = 
        "http://" + request.getServerName() + ":" + request.getServerPort() +
        request.getContextPath();
    </jsp:scriptlet>
    <jsp:element name="jnlp">
        <jsp:attribute name="spec">1.0+</jsp:attribute>
        <jsp:attribute name="codebase">
            <jsp:expression>requestPath</jsp:expression>
        </jsp:attribute>
        <jsp:attribute name="href">
            <jsp:text>jnlpFile.jsp</jsp:text>
        </jsp:attribute>
        <information>
            <title>DNIeAPP</title>
            <vendor>JJ</vendor>
            <homepage href="http://www.gruposp2p.org"/>
            <description>Aplicación para votaciones y firma de documentos</description>
            <description kind="short">DNIe</description>
        </information>
        <security>
            <all-permissions/>
        </security>
        <resources>
            <j2se version="1.5+"/>
            <jar eager="true" href="dnieApp.jar" main="true"/>
            <jsp:element name="property">
                <jsp:attribute name="name">documentURL</jsp:attribute>
                <jsp:attribute name="value">
                    <jsp:expression>documentURL</jsp:expression>
                </jsp:attribute>
            </jsp:element>
            <jsp:element name="property">
                <jsp:attribute name="name">postURL</jsp:attribute>
                <jsp:attribute name="value">
                    <jsp:expression>signatureDocumentPostURL + "/rest/dnieSignedDocuments"</jsp:expression>
                </jsp:attribute>
            </jsp:element>
        </resources>
        <application-desc main-class="dniegp2pclient.DNIeGP2PClientApp">
        </application-desc>
    </jsp:element>
</jsp:root>